﻿using System;
using System.Drawing;
using OpenCvSharp;
using Point = OpenCvSharp.Point;

namespace Interaction
{
    public class Mouse
    {
        private static Mat image;
        public void draw(MouseEventTypes event_types,int x,int y,MouseEventFlags flags,IntPtr user_data)
        {
            if (event_types == MouseEventTypes.LButtonDown)
            {
                Cv2.Circle(image,new Point(x,y),2,Scalar.Red,-1); 
            }

            if (event_types == MouseEventTypes.RButtonDown)
            {
                Cv2.Circle(image,new Point(x,y),2,Scalar.Green,-1);
            }
        }
        
        
        

        public void Set(Mat img)
        {
            image = img.Clone();
        }

        public Mat Get()
        {
            return image;
        }
        
    }
}